<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="seccionDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='seccionDetail.heading'/>"/>
    <script type="text/javascript" src="<c:url value='/scripts/selectbox.js'/>"></script>
</head>

<s:form id="seccionForm" action="saveSeccion" method="post" validate="true">
    <li style="display: none">
        <s:hidden key="seccion.id"/>
    </li>
    <s:textfield key="seccion.nombre" required="true" cssClass="text medium"/>
<li>
    <s:checkbox key="seccion.publicada" cssClass="checkbox" theme="simple"/>
    
    <s:label for="seccionForm_seccion_publicada" value="%{getText('seccion.publicada')}" cssClass="choice desc" theme="simple"/>
</li>
<li>
    <s:checkbox key="seccion.mostrarContenidoPropio" cssClass="checkbox" theme="simple"/>
    
    <s:label for="seccionForm_seccion_mostrarContenidoPropio" value="%{getText('seccion.mostrarContenidoPropio')}" cssClass="choice desc" theme="simple"/>
</li>

<li>

</li>	
     <s:select key="menuId" label="Menu" required="true" list="menues" />
     <s:select key="estructuraId" label="Estructura" required="true" list="estructuras" />
     <s:select key="listaId" label="Lista de Noticia" required="true" list="listaDeNoticias" />
    
        <li>
        <!-- 
         <fieldset>
            <legend><fmt:message key="userProfile.assignRoles"/></legend>
            <table class="pickList">
                <tr>
                    <th class="pickLabel">
                        <label class="required"><fmt:message key="user.availableRoles"/></label>
                    </th>
                    <td></td>
                    <th class="pickLabel">
                        <label class="required"><fmt:message key="user.roles"/></label>
                    </th>
                </tr>
                <c:set var="leftList" value="${availableRoles}" scope="request"/>
                <s:set name="rightList" value="seccion.roleList" scope="request"/>
                <c:import url="/WEB-INF/pages/pickList.jsp">
                    <c:param name="listCount" value="1"/>
                    <c:param name="leftId" value="availableRoles"/>
                    <c:param name="rightId" value="seccionRoles"/>
                </c:import>
            </table>
        </fieldset>
        -->
    </li>
    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple" onclick="onFormSubmit(this.form)" />
        <c:if test="${not empty seccion.id}">
            <s:submit cssClass="button" method="delete" key="button.delete"
                onclick="return confirmDelete('Seccion')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>
    
</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("seccionForm"));
function onFormSubmit(theForm) {
    selectAll('seccionRoles');
}
</script>

</script>
